@mixin setMargin($top, $right, $bottom, $left) {
  margin: $top $right $bottom $left;

  @media screen and (max-width: $medium) {
    $newTop: if($top == 'auto', $top, calc($top / 2));
    $newRight: if($right == 'auto', $right, calc($right / 2));
    $newBottom: if($bottom == 'auto', $bottom, calc($bottom / 2));
    $newLeft: if($left == 'auto', $left, calc($left / 2));

    margin: $newTop $newRight $newBottom $newLeft;
  }
}
